package com.xce.order.interceptor;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * @ClassName XTokenInterceptor
 * @Description TODO
 * @Author lld
 * @Date 2025/7/1 17:09
 * @Version 1.0
 */
@Slf4j
@Component
public class XTokenInterceptor implements RequestInterceptor {

    @Override
    public void apply(RequestTemplate requestTemplate) {

        log.info("正在执行请求拦截器。。");
        requestTemplate.header("X-Token", UUID.randomUUID().toString());
    }
}
